@import "variables";

.navi-wrap {
  ul.nav li a.active {
    background-color: #32374a;
    color: #ffffff;
  }
}

.notification {
  height: auto;
}

.app-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

.app-header {
  /*z-index: 500;*/
}

.btn.disabled, .btn[disabled], fieldset[disabled] .btn, a.disabled, li.disabled a {
  pointer-events: none;
  color: $text-muted;
}

body {
  font-family: $font-family-base;
}

//@import "bootstrap-datatable";
@import "react-select";
@import "react-bootstrap-datetimepicker";


.invisible {
  position: absolute !important;
  clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
  clip: rect(1px,1px,1px,1px);
}

.Select-menu-outer {
  z-index: 10;
}

.form {
  position: relative;

  .form-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    margin-top: -31px;
    margin-left: -37px;
    background: rgba(0,0,0, 0.6);
    padding: 10px;
    border-radius: 10px;
    z-index: 10;
  }
}

.page-wrapper {
  // 千万不要加，会影响左边栏高度的。
  // position: relative;

  .page-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    margin-top: -31px;
    margin-left: -37px;
    background: rgba(0,0,0, 0.6);
    padding: 10px;
    border-radius: 10px;
    z-index: 10;
  }
}

.service {
  position: relative;

  .service-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    margin-top: -31px;
    margin-left: -37px;
    background: rgba(0,0,0, 0.6);
    padding: 10px;
    border-radius: 10px;
    z-index: 10;
  }
}

.monaco-inputbox>.wrapper {
  padding: 0;
}

.i-switch input:checked + i:after,
.i-switch i:after {
  left: 0;
}

.form-control-static {
  word-break: break-all;
}

.inline-form-control {
  padding: 0 15px;
}
.app {
  min-height: 736px;
}
@media (min-width: 768px) {
  .app {
    min-height: 100%;
  }
  .form-inline, .form-inline > .form-row {
    margin-left: -5px;
    margin-top: -5px;

    > .plain-text {
      padding-top: 12px;
    }

    > .form-group,
    > .btn,
    .panel-body > .form-group,
    .panel-body > .btn {
      margin-left: 5px;
      margin-top: 5px;
    }

    > .form-group {
      display: inline-block;
      vertical-align: top;

      &.form-item-submit,
      &.form-item-button {
        //padding-top: 10px;
      }

      > .input-date {
        display: inline;
      }
    }
  }

  .form-inline .radio .i-checks,
  .form-inline .checkbox .i-checks {
    padding-left: 20px;
  }
  .form-inline > .form-row {
    margin-left: 0;

    &:not(:first-child) {
      margin-top: 15px;
      margin-bottom: 15px;
    }
  }

  .form-inline .form-item-checkbox {
    padding-top: 7px;
  }

  .form-inline, .form-inline > .form-row {
    .control-label {
      margin-right: 5px;
    }

    .Select {
      display: inline-block;
      vertical-align: middle;
      width: 160px;
    }

    .btn {
      vertical-align: top;
    }
  }

  .chained-select {
    margin-left: -5px;
    .Select {
      display: inline-block;
      margin-left: 5px;
      margin-bottom: 5px;
      min-width: 195px;
      vertical-align: top;
    }
  }

  .form-group-inline {
    display: inline;
    white-space: nowrap;

    .radio,
    .checkbox,
    .radio-inline,
    .checkbox-inline {
      margin-top: 0;
      margin-bottom: 0;
    }

    .checkbox .checkbox-inline,
    .checkbox .radio-inline {
      padding-top: 0;
    }

    > .col-sm-1, > .col-sm-2, > .col-sm-3, > .col-sm-4, > .col-sm-5, > .col-sm-6,
    > .col-sm-7, > .col-sm-8, > .col-sm-9, > .col-sm-10, > .col-sm-11, > .col-sm-12,
    > .col-md-1, > .col-md-2, > .col-md-3, > .col-md-4, > .col-md-5, > .col-md-6,
    > .col-md-7, > .col-md-8, > .col-md-9, > .col-md-10, > .col-md-11, > .col-md-12,
    > .col-lg-1, > .col-lg-2, > .col-lg-3, > .col-lg-4, > .col-lg-5, > .col-lg-6,
    > .col-lg-7, > .col-lg-8, > .col-lg-9, > .col-lg-10, > .col-lg-11, > .col-lg-12,
    > .col-xs-1, > .col-xs-2, > .col-xs-3, > .col-xs-4, > .col-xs-5, > .col-xs-6,
    > .col-xs-7, > .col-xs-8, > .col-xs-9, > .col-xs-10, > .col-xs-11, > .col-xs-12 {
      float: none;
    }

    .inline-checkboxes-control {
      margin-left: -20px;
    }

    .inline-form-control {
      vertical-align: top;
      display: inline-block;
      padding: 0 15px;
    }

    .inline-checkbox {
      margin-left: -15px;
      margin-right: -15px;
    }

    .control-label {
      padding-top: 7px;
    }

    .control-label,
    .form-control,
    >.checkbox,
    .form-control-static {
      vertical-align: top;
      display: inline-block;
    }

    .Select {
      vertical-align: top;
      display: inline-block;
      min-width: 211px;
    }
  }

  .form-inline .form-group-inline {
    .radio,
    .checkbox,
    .radio-inline,
    .checkbox-inline {
      padding-top: 7px;
    }
  }

  .combo-form {
    margin-left: -5px;
    margin-right: -5px;
    >.hbox > .col{
      padding: 0 5px;
      vertical-align: top;

       &.combo-formitem > .form-group {
        margin: 0;
      }
    }
  }

  .form-item-hbox {
    > div {
      margin-left: -5px;
      margin-right: -5px;

      >.hbox > .col{
        padding: 0 5px;
        vertical-align: top;
      }
    }
  }

  .combo-control .combo-control {
    padding: 15px;
    border: 1px solid lighten($border-color, 5%);
  }

  .form-normal {
    .form-group:not([class*=" m-"]) {
      margin-left: 0;
      margin-right: 0;
    }

    .control-label:not([class*=" m-"]) {
      margin-top: 0;
      padding-top: 0;
      margin-bottom: 5px;
    }

    .form-group.row {
      margin-right: -15px;
      margin-left: -15px;
    }

    .form-group-inline .control-label {
      padding-top: 7px;
    }

    .form-horizontal .form-group {
      margin-right: -15px;
      margin-left: -15px;
    }
  }
}

.form-group:empty {
  display: none;
}

%fieldSetBase {
  border: 1px solid lighten($border-color, 5%);
  position: relative;

  > legend {
    position: absolute;
    top: 0;
    left: 0;
    background: $panel-bg;
    display: inline-block;
    border: 0;
    width: auto;
  }

  > .form-group:last-child,
  > div > .form-group:last-child {
    margin-bottom: 0;
  }
}

.form:not(.form-inline) {
  .form-group {
    position: relative;
  }

  .form-group:last-child {
    margin-bottom: 0;
  }

  fieldset > .pull-in {
    margin-left: 0;
    margin-right: 0;
  }

  legend {
    font-weight: 300;
    padding: 0 0 5px 0;
    font-size: $font-size-lg;
    margin-bottom: 15px;
    border-bottom: 1px solid lighten($border-color, 5%);
    cursor: pointer;
  }

  fieldset {
    margin-bottom: 15px;
  }

  fieldset.fieldset-xs, fieldset.fieldSet-xs {
    @extend %fieldSetBase;

    padding: 10px 5px 5px;

    > legend {
      left: 5px;
      font-size: $font-size-xs;
      padding: 0 3px;
      margin: -10px 0 0 -3px;
    }
  }

  fieldset.fieldset-sm, fieldset.fieldSet-sm {
    @extend %fieldSetBase;

    padding: 10px;

    > legend {
      left: 10px;
      font-size: $font-size-sm;
      padding: 0 5px;
      margin: -10px 0 0 -5px;
    }
  }

  fieldset.fieldset, fieldset.fieldSet {
    @extend %fieldSetBase;

    padding: 15px;

    > legend {
      left: 15px;
      font-size: $font-size-base;
      padding: 0 8px;
      margin: -10px 0 0 -8px;
    }
  }

  fieldset.fieldset-md, fieldset.fieldSet-md {
    @extend %fieldSetBase;
    padding: 20px;

    > legend {
      left: 20px;
      font-size: $font-size-md;
      padding: 0 10px;
      margin: -11px 0 0 -10px;
    }
  }

  fieldset.fieldset-lg, fieldset.fieldSet-lg {
    @extend %fieldSetBase;
    padding: 30px;

    > legend {
      left: 30px;
      font-size: $font-size-lg;
      padding: 0 15px;
      margin: -15px 0 0 -15px;
    }
  }



  .hbox .col {
    .form-group:not([class*=" m-"]):not(.row) {
      margin-left: 0;
      margin-right: 0;
    }
  }
}

.panel.panel-form {
  .panel-footer {
    background: #fefefe;
    text-align: right;
  }

  .panel-footer > .form-group, .panel-footer > .btn {
    margin-left: 5px;
  }
}

.required {
  color: $brand-danger;
}

.navi ul.nav li a {
  padding: 10px 15px;

  >i {
    margin: -5px 0 -5px -7px;
    line-height: 30px;
    width: 30px;
    float: left;
    text-align: center;
    position: relative;
    overflow: hidden;
  }
}

.navi .line {
  border-top: none;
  height: 1px;
}

.navi ul.nav li li a {
  padding-left: 38px;
}

.navi ul.nav li li li a {
  padding-left: 62px;
}

.navi ul.nav li li li li a {
  padding-left: 84px;
}

@media (min-width: 768px) {
  .app-aside-folded .navi>ul>li>a {
    height: 40px;
  }
  .app-aside-folded .navi li li li a {
    padding-left: 40px !important;
  }

  .app-footer.app-footer-no-aside {
    margin-left: 0;
  }
}

//.input-group-btn:last-child > .btn,
//.input-group-btn:last-child > .btn-group {
//  height: 34px;
//}

//.tab-content {
//  margin-top: 20px;
//}

textarea.form-control {
  resize: none;
}

.app:not(.app-aside-folded) {
  .navbar-brand {
    display: block;
    text-align: left;
    font-weight: normal;
  }
}

.app {
  padding-bottom: 50px;
  // min-height: 600px;
}

.app-content-body {
  padding-bottom: 0;
}

.modal-content > button.close {
  position: relative;
  z-index: 100;
  margin: 15px 15px 0 0;
}

.page-body {
  // 千万别加，影响的地方很多。
  //position: relative;

  .page-edit-btn {
    background: lighten($brand-light, 2%);
    border-bottom: 1px dashed $border-color;
    text-align: right;
  }

  .page-edit-btn.fixed {
    background: transparent;
    border-bottom: 0;
    position: absolute;
    right: 0;
    top: 50px;
  }
}

.resizer {
  position: absolute;
  top: 0;
  bottom: 0;
  margin-left: -2px;
  width: 4px;
  background: lighten($brand-dark, 20%);
  z-index: 10;
  cursor: col-resize;

  &:hover {
    background: $brand-dark;
  }
}

.page-body, .crud-wrapper {
  > .panel:last-child {
    margin-bottom: 0;
  }
}

.editor-full {
  width: 100%;
  height: 100%;
  overflow: scroll;

  .CodeMirror {
    width: 100%;
    height: 100%;
  }
}

.schema-editor-wrapper {
  position: relative;
  width: 100%;
  height: 100%;

  .schema-editor {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 50px;
  }

  .schema-editor-toolbar {
    position: absolute;
    left: 7px;
    right: 0;
    bottom: 0;
    height: 50px;
  }


  .quick-create-editor {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: auto;
    background: #fff;
    padding-bottom: 51px;
    .panel-footer {
      position: fixed;
      bottom: 0;
      width: 100%;
      z-index: 3;
    }
    .panel {
      border-width: 0;
      box-shadow: none;
    }
  }
  .btn-wrapper {
    bottom: 0;
    padding: 10px 15px;
    right: 0;
    z-index: 5;
    .btn {
      margin-left: 5px;
    }
  }
}

.breadcrumb a {
  color: inherit;
}

.navbar-btn {
  margin-top: 8px;
  margin-bottom: 8px;
}

.has-error .combo-form .form-item:not(.has-error) {
  color: #737373;

  .form-control {
    border-color: #cfdadd;
    box-shadow: none;
  }

  .control-label,
  .radio-inline,
  .checkbox-inline {
    color: #737373;
  }
}

/*.form-item-combo.has-error {
  border: 1px dashed #a94442;
  padding: 5px;
}*/


.input-range {
  min-width: 200px;
}

.input-list {
  white-space: nowrap;
  margin: -5px;

  .input-list-item {
    display: inline-block;
    margin: 5px;
    cursor: pointer;
    text-align: center;
    border: 1px solid $input-border;
    border-radius: 0;
    padding: 5px;
    box-shadow: 0 1px 1px rgba(90, 90, 90, 0.1);

    &:hover  {
      border-color: #c7d3d6;
      color: #58666e;
      background: #edf1f2;
    }

    &.active {
      border-color: #189ec8;
      background: $brand-info;
      color: #fff;
      box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
    }

    &.disabled {
      //cursor: not-allowed;
      pointer-events: none;
    }

    img {
      display: block;
    }
  }

  &.input-list-sm {
    margin: -3px;

    .input-list-item {
      margin: 3px;
    }
  }
}

.tabs-wrapper {
  position: relative;

  .tab-toolbar {
    position: absolute;
    top: 0;
    right: 0;
    height: 42px;
    vertical-align: middle;
    line-height: 42px;
  }
}

.pass-forceverify-wrapper,
.pass-forceverify-wrapper *,
.pass-forceverify-wrapper *:before,
.pass-forceverify-wrapper *:after {
  box-sizing: content-box;
}

.pass-forceverify-wrapper input {
  box-sizing: border-box;
}

.form-item .placeholder {
  color: $text-muted;
  margin-top: 7px;
}
.combo-list .tr-dragging {
  opacity: 0;
}

.form-group  {
  .group-item-container {
    min-height: 50px;
    position: relative;
  }

  .btn-wrap {
    top: -11px;
    right: -11px;
  }
}


.table-responsive::-webkit-scrollbar {
  background: rgba(0, 0, 0, 0);
  width: 6px;
  height: 6px;
}
.table-responsive::-webkit-scrollbar-thumb {
  background: lighten(#7c7c7c, 20%);
  border-radius: 3px;
}
.table-responsive:hover::-webkit-scrollbar-thumb {
  background: #7c7c7c;
}

.star-text {
  padding-left: 17.3%;
}

.chart-background-color {
  background-color: #fff;
  padding-top: 10px;
}

.chart-form {
  margin-bottom: 0;
  margin-left: 50px;
  padding-bottom: 20px;
}

.project-address {
  overflow: auto;
}